package com.xc.freeapp.account.controller;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.validation.Valid;


import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.wordnik.swagger.annotations.Api;
import com.wordnik.swagger.annotations.ApiOperation;
import com.xc.freeapp.bean.AuthInfo;
import com.xc.freeapp.common.CheckUtils;
import com.xc.freeapp.common.ResponseBean;
import com.xc.freeapp.entity.Hospital;
import com.xc.freeapp.entity.HospitalScheduling;
import com.xc.freeapp.entity.UserLiving;
import com.xc.freeapp.entity.Users;
import com.xc.freeapp.exception.BaseException;
import com.xc.freeapp.redis.VerificationCodeDao;
import com.xc.freeapp.request.bean.Register;
import com.xc.freeapp.request.bean.ResetBean;
import com.xc.freeapp.service.HospitalService;
import com.xc.freeapp.service.RegisteredService;
import com.xc.freeapp.service.UsersService;
import com.xc.freeapp.service.impl.HospitalSchedulingService;
import com.xc.freeapp.service.impl.UserLivingServiceImpl;
import com.xc.freeapp.util.AuthUtil;
import com.xc.freeapp.util.Constant;
import com.xc.freeapp.util.DateUtils;
import com.xc.freeapp.util.TokenAnnotation;
import com.xc.freeapp.util.UploadUtil;

import com.xc.freeapp.util.JwtUtil;

@Controller
@RequestMapping("/v3/hospitalscheduling")
@Api(value = "/v3/hospitalscheduling", description = "诊所排班")
public class HospitalSchedulingController extends AbstractController {
	private Logger log = Logger.getLogger(this.getClass());
	@Autowired
	HospitalSchedulingService hospitalSchedulingService;
	/**
	 * 
	 * 
	 * @param request
	 * @return
	 */
	@TokenAnnotation(required = false)
	@RequestMapping(value = "", method = RequestMethod.GET)
	@ResponseBody
	@ApiOperation(value = "获取诊所排班信息")
	public List<HospitalScheduling> getVerificationCode()
			throws BaseException {
		AuthInfo authInfo = AuthUtil.getAuthInfo(getRequest());
		return hospitalSchedulingService.selectByHospitalid(authInfo.getAppIntId());
	}

}
